<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<%@ include file="/common/taglibs.jsp"%>
<link href="${ctx}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${ctx}/resources/admin/editor/kindeditor.js"></script>
<script type="text/javascript" src="${ctx}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${ctx}/resources/admin/js/input.js"></script>
<script type="text/javascript">
$().ready(function() {

	var $inputForm = $("#inputForm");
	var $type = $("#type");
	var $logo = $("#logo");
	var $browserButton = $("#browserButton");
	
	$browserButton.browser();
	
	$type.change(function() {
		if ($(this).val() == "text") {
			$logo.val("").prop("disabled", true);
			$browserButton.prop("disabled", true);
		} else {
			$logo.prop("disabled", false);
			$browserButton.prop("disabled", false);
		}
	});
	
	// 表单验证
	$inputForm.validate({
		rules: {
			"rs.name": "required"
		}
	});
	
});
</script>
</head>
<body>
	<div class="path">
		<a href="${ctx}/admin_Admin_index.action">首页</a> &raquo; 添加
	</div>
	<form id="inputForm" autocomplete="off" action="${ctx}/admin_Demo_saveorupdate.action" method="post">
		<table class="input">
			<tbody>
				<tr>
					<th><span class="requiredField">*</span>姓名:</th>
					<td><input type="text" maxlength="200" class="text" name="rs.name" /></td>
				</tr>
				<tr>
					<th>年龄:</th>
					<td><input type="text" maxlength="200" class="text" name="rs.age" /></td>
				</tr>
				<tr>
					<th>性别:</th>
					<td>
						<select name="rs.sex" id="type">
							<option value="M">男</option>
							<option value="F">女</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>介绍:</th>
					<td><textarea id="editor" name="rs.introduction" class="editor"></textarea></td>
				</tr>
				<tr>
					<th>状态:</th>
					<td>
						<select name="rs.status">
							<option value="Y">有效</option>
							<option value="N">无效</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>&nbsp;</th>
					<td>
						<input type="submit" value="确&nbsp;&nbsp;定" class="button" />
						<input type="button" onclick="location.href='${ctx }/admin_Demo_list.action'" value="返&nbsp;&nbsp;回" class="button" />
					</td>
				</tr>
			</tbody>
		</table>
	</form>
</body>
</html>